package com.wangjiyuan.giftshuo.ui.fragment.home;

import com.wangjiyuan.giftshuo.bean.home.column.HomeBean;
import com.wangjiyuan.giftshuo.http.HttpUtils;

import java.util.HashMap;
import java.util.Map;

import rx.Observable;

/**
 * Created by wjy on 2016/11/18.
 */

public class RecyclerModel implements RecyclerContract.RecyclerModel {
    @Override
    public Observable<HomeBean> loadHomeBean(int id) {
        Map<String, String> map = new HashMap<>();
        map.put("ad", "2");
        map.put("gender", "2");
        map.put("generation", "0");
        map.put("limit", "20");
        map.put("offset", "0");
        return HttpUtils.getInstance().getHttpInterfaces().getHomeBean(String.valueOf(id), map);
    }

    @Override
    public Observable<HomeBean> loadNextHomeBean(int id, int offset) {
        Map<String, String> map = new HashMap<>();
        map.put("ad", "2");
        map.put("gender", "2");
        map.put("generation", "0");
        map.put("limit", "20");
        map.put("offset", String.valueOf(offset));
        return HttpUtils.getInstance().getHttpInterfaces().getHomeBean(String.valueOf(id), map);
    }
}
